$(function(){
    imgSrcToggle();//调用函数
    var h = $("#carousel-example-generic").height();
    $("#canvas").height(h);
    $("#carousel-example-generic").width($("#canvas").width());
})


//写一个函数，此函数实现的功能是经过图片更改图片的src属性
function imgSrcToggle(){
    // $(".xiutu_box_content img").attr("src", "img/CameraRaw.png");
    var imgArray = ["img/CameraRaw.png","img/Photoshop.png","img/Lightroom.png","img/RAW.png","img/PsBrush.png"]
    var imgArrayNew =["img/PsBrush.png","img/Photoshop.png","img/CameraRaw.png","img/RAW.png","img/Lightroom.png",]
    
    //初始化
    for(var i=0;i<imgArray.length;i++){
        $(".xiutu_box_content img").eq(i).attr("src", imgArray[i]);
    }

    $(".xiutu_box_content img").hover(function () {
            // over
            //得到当前鼠标经过图片的序号
            var i = $(".xiutu_box_content img").index(this);
            $(".xiutu_box_content img").eq(i).attr("src", imgArrayNew[i]);
            
        }, function () {
            // out
            var i =  $(".xiutu_box_content img").index(this);
            $(".xiutu_box_content img").eq(i).attr("src",imgArray[i]);
        }
    );
}